package com.yuan.service.subscribe;

import java.sql.SQLException;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.yuan.subscribe.Subscribe;

/**
 * 订阅
 * 
 * @author Beni
 * 
 */
public interface SubscribeService {

	/**
	 * 保存邮件
	 * 
	 * @param subscribe
	 * @throws DataAccessException
	 */
	public void save(Subscribe subscribe) throws SQLException;

	/**
	 * 读取有效的订阅者邮件
	 * 
	 * @throws DataAccessException
	 */
	public List<Subscribe> readEffect() throws SQLException;

	/**
	 * 发送邮件
	 * 
	 * @throws Exception
	 */
	public void sendMail() throws Exception;
}
